﻿@using InfoTech.VinhSon.Bussiness
@model IEnumerable<InfoTech.VinhSon.Bussiness.Group>
<div class="group-panel stdform stdform2">
    @{
        List<int> ids = new List<int>();
        if (ViewBag.Ids != null)
        {
            ids.AddRange((List<int>)ViewBag.Ids);
        }
        foreach (Group @group in Model)
        {
        <p>
            <label title="@group.Description">
                @group.Name</label>
            <span class="field">
                <input type="checkbox" title="@group.Description" gid="@group.Id" @(ids.Contains(group.Id) ? "checked" : "")/>
                <br />
            </span>
        </p>
        }
    }
    <p class="stdformbutton">
        <label>
        </label>
        <input type="button" onclick="javascript:updateGroup();" value="Update" class="btn btn-primary" />
    </p>
</div>
